import router  from "@/router/index.js";

//校验按钮权限
export function checkPermission(permission) {
    const permissions =router.currentRoute.value.meta.btnPermissions || [];
    if (permission && permission instanceof Array && permission.length > 0) {
        return permission.some(permission => {
            return permissions.includes(permission);
        })
    } else {
        return true;
    }
}